home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 081 / runopus.arc / RUNOPUS.BAT
Encoding:
DOS Batch File  |  1987-01-29  |  6.0 KB  |  189 lines

  1. ;January 7, 1987
  2. ;Satore Center OPUS  161/521
  3. ;
  4. ;Since there have been some questions about setting up a BATch file
  5. ;for OPUS, here is a sample for you to review.  Comments are always
  6. ;preceeded by a semi-colon.
  7. ;
  8. ;Your own BATch file should be much simpler than this.  We've thrown
  9. ;everything we could think of here just to provide some examples for
  10. ;deep thought and meditation...
  11.  
  12. ;Start BATch file here
  13. ;
  14. :START
  15. ;If you are using WATCHDOG to monitor the status of your modem, be
  16. ;sure and turn it off before invoking OPUS.  Otherwise your system
  17. ;will reboot after the caller disconnects.  If you are not using
  18. ;WATCHDOG then disregard this.
  19. ;
  20. watchdg1 off
  21. ;
  22. ;Here we invoke OPUS.  We are using the '-u' command line switch
  23. ;to make OPUS unpacket any ARCmail packets it may find before it
  24. ;goes online.  This is optional -- see your documentation.
  25. ;
  26. opus opus -u
  27. ;
  28. ;Here we check for ERRORLEVELS do do various things...
  29. ;     ENDCALLER = Where OPUS goes after a caller disconnects.
  30. ;                 This is an option in the OPUS CTL file.
  31. ;     ROBOTMAIL = Does any ROBOT auto-mailing stuff.
  32. ;     OUTSIDE   = Where the Main Menu O) options goes.
  33. ;     REMOTE    = For Sysop-level Zero DOS drop (Sysop Menu).
  34. ;     START     = The beginning of the BATch file.
  35. ;     EM        = Where the outgoing mail is handled.
  36. ;     MAKELOGS  = Daily maintenance.
  37. ;     WARMBOOT  = Boots the system.
  38. ;     ECHOMAIL  = Where EchoMail is done.
  39. ;     QUICKTOSS = What happens after CRASHMAIL is received.
  40. ;                 Another option -- see the CTL file.
  41. ;     CLEANUP   = More daily maintenance.
  42. ;
  43. ;This is a VERY complex sample BATch file.  Your need not be anything
  44. ;like this at all.  We have just tried to show most of the possibilities
  45. ;which can be encountered.
  46. ;
  47. if errorlevel 25 goto ENDCALLER
  48. if errorlevel 24 goto ROBOTMAIL
  49. if errorlevel 23 goto OUTSIDE
  50. if errorlevel 22 goto REMOTE
  51. if errorlevel 21 goto START
  52. if errorlevel 20 goto EM
  53. if errorlevel 15 goto MAKELOGS
  54. if errorlevel 13 goto WARMBOOT
  55. if errorlevel 12 goto ECHOMAIL
  56. if errorlevel 11 goto QUICKTOSS
  57. if errorlevel 10 goto CLEANUP
  58. if errorlevel  2 goto START
  59. GOTO FINIS
  60.  
  61.  
  62. ;When a user hits the O) option from the Main Menu, this sample file
  63. ;invokes the outside service called OUTER.  You could also use OUTSIDE
  64. ;or, in fact, any program of your own choosing.
  65. ;
  66. :OUTSIDE
  67. watchdg1 on
  68. ctty com1
  69. echo off
  70. cls
  71. echo ------------------------------------------------------
  72. echo Loading OUTSIDE Service, please wait ...
  73. echo ------------------------------------------------------
  74. outer 128/v /1 15/l
  75. cls
  76. echo ------------------------------------------------------
  77. echo Please do not disconnect until you see OPUS ...
  78. echo ------------------------------------------------------
  79. ctty con
  80. ;
  81. ;The caller has quit OUTER and we now go back to OPUS at the start of
  82. ;the BATch file.
  83. ;
  84. GOTO START
  85.  
  86.  
  87. ;From the sysop menu, this is where the OUTSIDE (for Sysops) goes...
  88. ;
  89. :REMOTE
  90. watchdg1 on
  91. ctty com1
  92. cls
  93. echo ------------------------------------------------------
  94. echo Use EXIT to return to OPUS
  95. echo ------------------------------------------------------
  96. command
  97. ctty con
  98. baud
  99. ;
  100. ;Here is a little trick.  The program BAUD will return an errorlevel
  101. ;based upon the callers baud rate.  According to the baud rate we call
  102. ;OPUS using the baud command line switch.  To the caller this appears
  103. ;as though OPUS has been recalled normally.  However, notice that we
  104. ;never turned WATCHDOG off!  Therefore, after the caller disconnects
  105. ;the system will do a warm boot and restart the BATch file.  Thsi is
  106. ;an added precaution which really isn't necessary but is a good
  107. ;practice (to boot from time to time).
  108. ;
  109. if errorlevel 240 goto opus24
  110. opus online -b1200
  111. goto start
  112. :opus24
  113. opus online -b2400
  114. GOTO START
  115.  
  116.  
  117. ;If you asked OPUS (in the CTL file) to exit after each caller, here
  118. ;is where it would go.  Under normal circumstances this is a feature
  119. ;which doesn't have a lot of purpose unless you need to do some special
  120. ;processing after each caller.
  121. ;
  122. :ENDCALLER
  123. GOTO START
  124.  
  125.  
  126. ;Since OPUS doesn't handle outgoing mail yet, you must have some other
  127. ;mailer program do the work for you.  In this case we are using SEAdog(tm).
  128. ;Fido(tm) works fine too.
  129. ;
  130. :EM
  131. mailer
  132. GOTO START
  133.  
  134.  
  135. ;We go here for daily maintenance...
  136. ;
  137. :CLEANUP
  138. ;
  139. ;do whatever...
  140. ;
  141. GOTO START
  142.  
  143. ;Here is where we handle EchoMail if you choose to do your own toss
  144. ;and scan.  Remember that OPUS can do toss automatically for you if
  145. ;you choose.  See the documentation and the CTL file for examples.
  146. ;
  147. :ECHOMAIL
  148. ;do toss, scan, arcmail, killdupes, whatever...
  149. GOTO START
  150.  
  151.  
  152. ;If you choose it in the CTL file, OPUS will exit after it receives
  153. ;CRASHMAIL to do any processing you want.  This is also where OREMOTE
  154. ;lives if you use it (see OREMOTE documentation -- a separate utility).
  155. ;
  156. :QUICKTOSS
  157. ;do whatever...
  158. ;do OREMOTE...
  159. GOTO START
  160.  
  161. ;Just another maintenance thingy to liven up the BATch file...
  162. ;
  163. :MAKELOGS
  164. ;how about ARCing those massive logs?
  165. ;
  166.  
  167. ;If you like to reboot your system automatically from time to time...
  168. ;
  169. :WARMBOOT
  170. echo ------------------------------------------------------
  171. echo Rebooting the system
  172. echo ------------------------------------------------------
  173. warm
  174.  
  175. ;If you're a hub you may need to ROBOTIZE your friends...
  176. ;
  177. :ROBOTMAIL
  178. echo ------------------------------------------------------
  179. echo Processing ROBOT Mail
  180. echo ------------------------------------------------------
  181. ;robomail ... etc...
  182. goto START
  183.  
  184. ;And here is where we go when you hit control-c from the keyboard...
  185. ;
  186. :FINIS
  187. echo on
  188. cls
  189.